//
//  YD_publishVedioCell.m
//  SpeedDating
//
//  Created by isu on 17/1/19.
//  Copyright © 2017年 isu. All rights reserved.
//

#import "FriendpublishVedioCell.h"

@implementation FriendpublishVedioCell


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}
+(instancetype)cellWithTableView:(UITableView*)tableView {
    static NSString *ID = @"FriendpublishVedioCell";
    FriendpublishVedioCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if(cell==nil){
        cell = [[FriendpublishVedioCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID ];
        cell.backgroundColor =[UIColor whiteColor];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return cell;
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]){
        self.vedioImageV = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"Friend_news_add"]];
        [self.contentView addSubview:self.vedioImageV];
        [self.vedioImageV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.contentView).offset(20);
            make.top.mas_equalTo(10);
            make.width.mas_equalTo(self.contentView.mas_width).multipliedBy(0.25);
            make.height.mas_equalTo(self.vedioImageV.mas_width).multipliedBy(110/130.0);
        }];
    }
    return self;
}
-(CGFloat)getHeight{
    [self layoutIfNeeded];
    CGFloat H = CGRectGetMaxY(self.vedioImageV.frame);
    return  H+20;
}
@end
